#!/bin/bash

ULC_FILE="sample.ulc"
PROG="./uls_stream -L $ULC_FILE"
TARGET_FILES="bin-le.uls bin-be.uls"
DFL_OUTPUT_FILE0="/tmp/uls_a.txt"
DFL_OUTPUT_FILE="/tmp/uls_b.txt"

$PROG -o $DFL_OUTPUT_FILE0 input1.txt 

for testfile in $TARGET_FILES; do
	echo "checking $testfile, ...";
	$PROG -o $DFL_OUTPUT_FILE $testfile 

	diff $DFL_OUTPUT_FILE0 $DFL_OUTPUT_FILE; 
	if [ $? != 0 ]; then
		echo "FAIL: $testfile";
	fi
done

